package com.service;

import com.mapper.categoryMapper;
import com.pojo.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryService {
    @Autowired
    private categoryMapper categorymapper;

    public List<Category> categoryList(){
         return categorymapper.findCategory();
    }
    public int addcategory(Category category){
        return categorymapper.addCategory(category);

    }
    public Category findonecategory(Integer id){
        return categorymapper.findOneCategory(id);

    }
    public int update_category(Category category){
        return categorymapper.updateCategory(category);
    }

}
